<template>
  <view class="wrap">
    <view class="status"></view>
    <view class="list">
      <uv-cell-group>
        <template v-for="(item, index) in list" :key="index">
          <uv-cell :title="item.name" :url="`/pages/web?id=${item.id}`" isLink center border titleStyle='font-weight: 500; font-size: 32rpx; color: #2B2B2B;' cellStyle='background-color: #FFF'></uv-cell>
        </template>
      </uv-cell-group>
    </view>
  </view>
</template>

<script setup>
import { onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import { post } from '@/api';

let list = ref([]);

onLoad(() => {
  getList();
})

function getList(e){
  const params = {
    page: 1,
    limit: 100
  }
  post('api/single_page/singlePageList', params).then(res => {
    if(res.code == 1){
      const data = res.data;
      list.value = data.data;
    }
  })
}
</script>

<style lang="scss" scoped>
  .list{
    padding: 0 30rpx;
    margin-bottom: 20rpx;
    background-color: #fff;
    :deep(.uv-cell-group){
      .uv-cell__body.uv-cell--center{
        padding: 20rpx 0;
        .uv-cell__left-icon-wrap{
          display: none;
        }
      }
    }
    :deep(.uv-cell__value){
      font-weight: 400;
      font-size: 28rpx;
      color: #999999;
    }
  }
  .status{
    width: 100%;
    height: 20rpx;
    background-color: #F5F5F5;
  }
  .wrap{
    width: 100%;
    min-height: 100vh;
    background-color: #F5F5F5;
  }
</style>